﻿using System.Threading.Tasks;

namespace Xms.Abp.Features;

public class DefaultValueFeaturesValueProvider : FeaturesValueProvider //TODO: Directly implement IFeatureValueProvider
{
    public const string ProviderName = "D";

    public override string Name => ProviderName;

    public DefaultValueFeaturesValueProvider(IFeaturesStore settingStore)
        : base(settingStore)
    {

    }

    public override Task<string> GetOrNullAsync(FeatureValueDefinition setting)
    {
        return Task.FromResult(setting.DefaultValue);
    }
}
